/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50716
Source Host           : localhost:3306
Source Database       : thinkphp

Target Server Type    : MYSQL
Target Server Version : 50716
File Encoding         : 65001

Date: 2017-12-21 14:21:03
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for think_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group`;
CREATE TABLE `think_auth_group` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`title`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`rules`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`beizhu`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='用户组表'
AUTO_INCREMENT=7

;

-- ----------------------------
-- Records of think_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group` VALUES ('2', '管理员', '1', '1,2,4,7,9,10,11', null), ('3', '普通用户', '1', '1,2,9', ''), ('1', '超级管理员', '1', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15', null), ('6', '111', '1', '1,2,9', '111');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group_access`;
CREATE TABLE `think_auth_group_access` (
`uid`  mediumint(8) NOT NULL COMMENT '用户id' ,
`group_id`  mediumint(8) UNSIGNED NOT NULL COMMENT '用户组id' ,
UNIQUE INDEX `uid_group_id` (`uid`, `group_id`) USING BTREE ,
INDEX `uid` (`uid`) USING BTREE ,
INDEX `group_id` (`group_id`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='用户组明细表'

;

-- ----------------------------
-- Records of think_auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '3'), ('4', '3'), ('42', '2');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_rule`;
CREATE TABLE `think_auth_rule` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则唯一标识' ,
`title`  char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则中文名称' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：为1正常，为0禁用' ,
`type`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`condition`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则表达式，为空表示存在就验证，不为空表示按照条件验证' ,
`pid`  int(11) NULL DEFAULT NULL ,
`is_menu`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `name` (`name`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='规则表'
AUTO_INCREMENT=16

;

-- ----------------------------
-- Records of think_auth_rule
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_rule` VALUES ('1', 'home/user/info', '查看信息', '1', '1', '', '9', '1'), ('2', 'home/user/updatepwd', '修改密码', '1', '1', '', '9', '1'), ('3', 'home/user/role', '角色管理', '1', '1', '', '10', '1'), ('4', 'home/user/items', '用户列表', '1', '1', '', '10', '1'), ('5', 'home/user/auth', '权限管理', '1', '1', '', '10', '1'), ('6', 'home/user/testauth', '测试', '1', '1', '', null, '0'), ('7', 'home/user/dblist', '用户管理表', '1', '1', '', null, '0'), ('8', 'home/user/listitems', '角色管理表', '1', '1', '', null, '0'), ('9', 'home/user/main', '基本信息', '1', '1', '', '0', '1'), ('10', '', '用户管理', '1', '1', '', '0', '1'), ('11', 'home/user/addAuth', '添加权限', '1', '1', '', null, '0'), ('12', 'home/user/authlist', '角色信息', '1', '1', '', null, '0'), ('13', 'home/user/rulelist', '权限列表', '1', '1', '', null, '0'), ('14', 'home/user/userlist', '获取用户', '1', '1', '', null, '0'), ('15', 'home/user/adduserlist', '给用户添加角色', '1', '1', '', null, '0');
COMMIT;

-- ----------------------------
-- Table structure for think_userinfo
-- ----------------------------
DROP TABLE IF EXISTS `think_userinfo`;
CREATE TABLE `think_userinfo` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`username`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`nickname`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`password`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '123123' ,
`address`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`phone`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`birthday`  datetime NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=47

;

-- ----------------------------
-- Records of think_userinfo
-- ----------------------------
BEGIN;
INSERT INTO `think_userinfo` VALUES ('1', 'zhangsan', '张三', '4297f44b13955235245b2497399d7a93', '北京', '13112341234', '2017-12-03 00:00:00'), ('2', 'lisi', '李四', '4297f44b13955235245b2497399d7a93', '天津', '13110011234', '2017-12-21 00:00:00'), ('3', 'wangwu', '王五', '4297f44b13955235245b2497399d7a93', '天津', '13111111111', '2017-11-09 10:00:07'), ('4', 'liuqiang', '刘强', '4297f44b13955235245b2497399d7a93', '上海', '15777777777', '2017-12-07 10:00:12'), ('5', 'qiangwei', '蔷薇', '4297f44b13955235245b2497399d7a93', '上海', '17111111111', '2017-12-14 10:00:16'), ('6', 'zhangqian', '张倩', '4297f44b13955235245b2497399d7a93', '杭州', '15666666666', '2017-12-07 10:00:19'), ('41', 'wangqi', '王琦', '4297f44b13955235245b2497399d7a93', '上海', '13111111111', '2017-11-28 00:00:00'), ('42', 'liming', '李明', '4297f44b13955235245b2497399d7a93', '上海', '13111111111', '2017-12-05 17:30:01'), ('43', 'liuyan', '刘岩', '4297f44b13955235245b2497399d7a93', '河北', '13111111111', '2017-12-17 00:00:00'), ('44', 'zhangming', '张明', '4297f44b13955235245b2497399d7a93', '上海', '13111111111', '2017-11-01 00:00:00'), ('45', 'wangguo', '王国', '4297f44b13955235245b2497399d7a93', '北京', '13111111111', '2017-11-28 00:00:00'), ('46', 'wangming', '王明', '4297f44b13955235245b2497399d7a93', '', '13111111111', '2017-12-17 00:00:00');
COMMIT;

-- ----------------------------
-- Auto increment value for think_auth_group
-- ----------------------------
ALTER TABLE `think_auth_group` AUTO_INCREMENT=7;

-- ----------------------------
-- Auto increment value for think_auth_rule
-- ----------------------------
ALTER TABLE `think_auth_rule` AUTO_INCREMENT=16;

-- ----------------------------
-- Auto increment value for think_userinfo
-- ----------------------------
ALTER TABLE `think_userinfo` AUTO_INCREMENT=47;
